<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // var date3 = new Date()   // 构造函数
    // var date = new Date('1990-10-10')   // 构造函数
    // var date2 = new Date(1990, 1, 10)   // 构造函数

    // console.log(date)
    // console.log(date2)


    // const moonLanding = new Date()
    // console.log(moonLanding.getFullYear())

    var date = new Date()

    var hours = date.getHours()
    var minutes = date.getMinutes()
    var secondes = parseInt(date.getSeconds()) >= 10 ?  parseInt(date.getSeconds()) : '0' + parseInt(date.getSeconds())

    console.log( hours + ':' + minutes + ':' + secondes )
  </script>
</body>

</html>